16 static String
ReadLn (int maxLg
){
17 byte lin
[] = new byte [maxLg
];
21 car
= System
.in
.read();
22 if ((car
< 0) || (car
== '\n')) break;
26 catch (IOException e
){
30 if ((car
< 0) && (lg
== 0)) return (null); // eof
31 return (new String (lin
, 0, lg
));
34 public static void main (String args
[]){
35 Main myWork
= new Main(); // create a dinamic instance
36 myWork
.Begin(); // the true entry point
42 StringTokenizer idata
;
49 input
= Main
.ReadLn(255);
50 idata
= new StringTokenizer(input
);
51 nodos
= Integer
.parseInt(idata
.nextToken());
53 g
= new int[200][200];
54 input
= Main
.ReadLn(255);
55 idata
= new StringTokenizer(input
);
56 aristas
= Integer
.parseInt(idata
.nextToken());
62 input
= Main
.ReadLn(255);
63 idata
= new StringTokenizer(input
);
64 nodos
= Integer
.parseInt(idata
.nextToken());
70 StringTokenizer idata
;
74 if((input
= Main
.ReadLn (255)) != null){
75 idata
= new StringTokenizer (input
);
76 iRep
= Integer
.parseInt (idata
.nextToken());
77 iNum
= Integer
.parseInt (idata
.nextToken());
78 sNum
= Integer
.toString(iNum
);
82 cMat
= new char[2*iRep
+3][((2+iRep
)*iLon
)+(iLon
-1)];
84 for(int i
=0;i
<iLon
&&i
<8;i
++){
85 write(sNum
.charAt(i
));
90 }while((iRep
!=0)||(!sNum
.equals("0")));
93 void write(char cNum
){
168 void horizontal(int fila
){
169 for(int i
=1;i
<=iRep
;i
++){
170 cMat
[fila
][iIni
+i
]='-';
173 //char[][] cMat,int iRep
175 for(int i
=1;i
<iMid
;i
++)
176 cMat
[i
][iIni
+iRep
+1]='|';
180 for(int i
=iMid
+1;i
<iLast
;i
++)
181 cMat
[i
][iIni
+iRep
+1]='|';
185 for(int i
=iMid
+1;i
<iLast
;i
++)
190 for(int i
=1;i
<iMid
;i
++)
196 System
.out
.println();
197 for(int i
=0;i
<(2*iRep
+3);i
++){
198 for(int j
=0;j
<((2+iRep
)*iLon
+iLon
-1);j
++){
201 System
.out
.print(" ");
203 System
.out
.print(cMat
[i
][j
]);
206 System
.out
.println();
207 //System.out.println();